package noticeboard;

public class Notice implements Comparable<Notice>{
	private boolean isFixed;

	private boolean isNew;
	private int index;
	private int actualIndex;
	private int hitNumber;
	private String title;
	private String writer;
	private String date;
	private String link;
	
	public Notice(int index, int actualIndex, String title, String link) {
		this(index, actualIndex, 0, title, "", "", link);
	}
	
	public Notice(int index, int actualIndex, 
				  int hitNumber, String title, 
				  String writer, String date, String link) {
		this.isFixed			= false;
		this.isNew          = false;
		this.index 			= index;
		this.actualIndex 	= actualIndex;
		this.hitNumber 		= hitNumber;
		this.title 			= title;
		this.writer 			= writer;
		this.date 			= date;
		this.link		 	= link;
	}
	
	public int compareTo(Notice another) {
		return actualIndex - another.actualIndex;
	}
	
	public boolean isFixed() {
		return isFixed;
	}

	public void setFixed(boolean isFixed) {
		this.isFixed = isFixed;
	}
	
	public boolean isNew() {
		return isNew;
	}

	public void setNew(boolean isNew) {
		this.isNew = isNew;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public int getActualIndex() {
		return actualIndex;
	}

	public void setActualIndex(int actualIndex) {
		this.actualIndex = actualIndex;
	}

	public int getHitNumber() {
		return hitNumber;
	}

	public void setHitNumber(int hitNumber) {
		this.hitNumber = hitNumber;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getWriter() {
		return writer;
	}

	public void setWriter(String writer) {
		this.writer = writer;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}
}
